Optimal. Leaf size=64 \[ -\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-\frac{b \cot ^2(c+d x)}{2 d}+\frac{b \log (\tan (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.103521, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {3872, 2834, 2620, 14, 3768, 3770} \[ -\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-\frac{b \cot ^2(c+d x)}{2 d}+\frac{b \log (\tan (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2834
Rule 2620
Rule 14
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \csc ^3(c+d x) (a+b \sec (c+d x)) \, dx &=-\int (-b-a \cos (c+d x)) \csc ^3(c+d x) \sec (c+d x) \, dx\\ &=a \int \csc ^3(c+d x) \, dx+b \int \csc ^3(c+d x) \sec (c+d x) \, dx\\ &=-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}+\frac{1}{2} a \int \csc (c+d x) \, dx+\frac{b \operatorname{Subst}\left (\int \frac{1+x^2}{x^3} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}+\frac{b \operatorname{Subst}\left (\int \left (\frac{1}{x^3}+\frac{1}{x}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{b \cot ^2(c+d x)}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}+\frac{b \log (\tan (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.52254, size = 114, normalized size = 1.78 \[ -\frac{a \csc ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{a \sec ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{a \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}-\frac{a \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}-\frac{b \left (\csc ^2(c+d x)-2 \log (\sin (c+d x))+2 \log (\cos (c+d x))\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.094, size = 68, normalized size = 1.1 \begin{align*} -{\frac{a\cot \left ( dx+c \right ) \csc \left ( dx+c \right ) }{2\,d}}+{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{2\,d}}-{\frac{b}{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}}+{\frac{b\ln \left ( \tan \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.972545, size = 96, normalized size = 1.5 \begin{align*} -\frac{{\left (a - 2 \, b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) -{\left (a + 2 \, b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) + 4 \, b \log \left (\cos \left (d x + c\right )\right ) - \frac{2 \,{\left (a \cos \left (d x + c\right ) + b\right )}}{\cos \left (d x + c\right )^{2} - 1}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.82602, size = 316, normalized size = 4.94 \begin{align*} \frac{2 \, a \cos \left (d x + c\right ) - 4 \,{\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (-\cos \left (d x + c\right )\right ) -{\left ({\left (a - 2 \, b\right )} \cos \left (d x + c\right )^{2} - a + 2 \, b\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) +{\left ({\left (a + 2 \, b\right )} \cos \left (d x + c\right )^{2} - a - 2 \, b\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) + 2 \, b}{4 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right ) \csc ^{3}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.357, size = 228, normalized size = 3.56 \begin{align*} \frac{2 \,{\left (a + 2 \, b\right )} \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 8 \, b \log \left ({\left | -\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac{{\left (a + b - \frac{2 \, a{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac{4 \, b{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}{\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1} - \frac{a{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac{b{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]